package com.yyds.oneservice.mapper;

import com.yyds.oneservice.pojo.Product;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yyds.oneservice.vo.UserProductVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 商品信息 Mapper 接口
 * </p>
 *
 * @author lxy
 * @since 2022-12-12
 */
public interface ProductMapper extends BaseMapper<Product> {
    @Select("select u.id user_id, u.nickname nickname,u.icon icon,\n" +
            "p.id product_id ,p.name,p.pic,p.description,\n" +
            "p.original_price\n" +
            "\n" +
            "from product p join user_member u on u.id =p.u_id")
    List<UserProductVo> findUserProductVo();

}
